package io.renren.modules.sys.service.impl;

import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.sys.dao.HatAreaDao;
import io.renren.modules.sys.entity.HatAreaEntity;
import io.renren.modules.sys.service.HatAreaService;


@Service("hatAreaService")
public class HatAreaServiceImpl extends ServiceImpl<HatAreaDao, HatAreaEntity> implements HatAreaService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HatAreaEntity> page = this.page(
                new Query<HatAreaEntity>().getPage(params),
                new QueryWrapper<HatAreaEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<HatAreaEntity> getAreaByCity(String id){
        List<HatAreaEntity> hatAreaEntityList = baseMapper.getAreaByCity(id);
        return hatAreaEntityList;
    }

}
